<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
        
        <script type="text/javascript">
         KindEditor.ready(function(K) {
           var editor1 = K.create('textarea[id="content"]', {
               //width : w,
               cssPath: 'edit/plugins/code/prettify.css',
               uploadJson: 'edit/php/upload_json.php',
               fileManagerJson: 'edit/php/file_manager_json.php',
               allowFileManager: true,
               urlType: "domain",
               afterCreate: function() {
                   var self = this;
                   K.ctrl(document, 13, function() {
                       self.sync();
                       K('form[name=rowForm]')[0].submit();
                   });
                   K.ctrl(self.edit.doc, 13, function() {
                       self.sync();
                       K('form[name=rowForm]')[0].submit();
                   });
               }
           });
           prettyPrint();
       });
       </script> 
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <form action="" method="POST" id="rowForm">
            <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablegrid tableedit">
                <tr align="left">
                    <th colspan="2" align="left"><?= $title ?></th>
                </tr>
                <tr><td><?= translate('PUSH_STATUS') ?>:</td><td><?= $row['status'] ?></td></tr>
				<tr><td><?= translate('PUSH_PLATFORM') ?>:</td><td><?= $row['platform'] ?></td></tr>
				<tr><td><?= translate('PUSH_CHANNEL') ?>:</td><td><?= $row['channel'] ?></td></tr>
				<tr><td><?= translate('PUSH_AREA') ?>:</td><td><?= $row['area'] ?></td></tr>
				<tr><td><?= translate('PUSH_ROLEID') ?>:</td><td><?= $row['roleid'] ?></td></tr>				
				<tr><td><?= translate('PUSH_ROLENAME') ?>:</td><td><?= $row['role_name'] ?></td></tr>

               <tr><td><?= translate('PUSH_CONTENT') ?>:</td><td>
               <textarea cols="70" rows="13" name="row[content]" id="content" ><?= $row['content'] ?></textarea></td></tr> 
                <tr><td></td><td>
                    <input type="submit" value="<?= translate('SEND') ?>" id="submit"/>
                </td></tr>
            </table>
            <input type="hidden" value="<?= $row['id'] ?>" name='row[id]'/>
        </form>
        <script type="text/javascript">
            SG.init("core.form", function() {
                $.formValidator.initConfig({formid: "#rowForm", submitonce: true});
                $("#area_host").formValidator({empty: false, onshow: '<?= translate('PLASE_SELECT') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#mail_title").formValidator({empty: false, onshow: '<?= translate('PLASE_WRITE') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#mail_content").formValidator({empty: false, onshow: '<?= translate('PLASE_WRITE') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#keep_time").formValidator({empty: false, onshow: '<?= translate('MAIL_TIME_LIMIT_MIN_MAX') ?>'}).inputValidator({type: 'number', min: 1, max: 30, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                //groupname();
            });
        </script>
    </body>
</html>
